package interfaces;


import java.awt.Dimension;

import javax.swing.AbstractAction;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;

import javax.swing.Box;
import javax.swing.JTextField;
import javax.swing.JTabbedPane;
import java.awt.Font;
import java.awt.Insets;
import javax.swing.SwingConstants;
import java.awt.ComponentOrientation;
import javax.swing.JComboBox;
import javax.swing.border.CompoundBorder;
import javax.swing.border.LineBorder;
import javax.swing.border.MatteBorder;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.BevelBorder;
import javax.swing.border.TitledBorder;

public class MenuUsuario extends PanelGeneral {

	private static final long serialVersionUID = 1L;
	private BusquedaDeTitularDialogo idBusquedaTitular;
	 private Color color1;//Color mas claro
	    private Color color2;
	    private Color color3;//Color del border
	    private Color colort;//Color del TITULO
	    private Color colord;//Color del TITULO

	public MenuUsuario(PantallaPrincipal framePerteneciente) {
		super(framePerteneciente);
		setMinimumSize(new Dimension(500, 600));
		setPreferredSize(new Dimension(800, 550));
		setAlignmentY(1.0f);
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		
		setNombreCU("Menu principal");
		
		JPanel panelTrabajo = new JPanel();
		panelTrabajo.setMinimumSize(new Dimension(600, 500));
		panelTrabajo.setPreferredSize(new Dimension(600, 500));
		add(panelTrabajo);
		panelTrabajo.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
	
		panelTrabajo.setLayout(new BoxLayout(panelTrabajo, BoxLayout.Y_AXIS));
		this.add(panelTrabajo, BorderLayout.CENTER);
		panelTrabajo.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JPanel panel = new JPanel();
		panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
		panel.setPreferredSize(new Dimension(600, 500));
		panelTrabajo.add(panel);
		
		Component horizontalStrut_1 = Box.createHorizontalStrut(20);
		horizontalStrut_1.setMaximumSize(new Dimension(500, 160));
		horizontalStrut_1.setMinimumSize(new Dimension(200, 70));
		horizontalStrut_1.setPreferredSize(new Dimension(200, 70));
		panel.add(horizontalStrut_1);
		
		JPanel panel_5 = new JPanel();
		panel_5.setMaximumSize(new Dimension(400, 175));
		panel_5.setLayout(new BoxLayout(panel_5, BoxLayout.Y_AXIS));
		panel_5.setMinimumSize(new Dimension(500, 20));
		panel_5.setPreferredSize(new Dimension(500, 170));
		panel.add(panel_5);
		panel_5.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JPanel panel_6 = new JPanel();
		panel_6.setMinimumSize(new Dimension(600, 60));
		panel_6.setMaximumSize(new Dimension(600, 50));
		panel_5.setLayout(new BoxLayout(panel_5, BoxLayout.Y_AXIS));
		panel_6.setPreferredSize(new Dimension(600, 60));
		panel_5.add(panel_6);
		
		
		JButtonEfec btnNewButton=new JButtonEfec("All-mail-48.png","Emitir licencia","Ctrl+E");
		btnNewButton.setMinimumSize(new Dimension(150, 50));
		btnNewButton.setMaximumSize(new Dimension(150, 50));
		btnNewButton.setPreferredSize(new Dimension(250, 50));
		btnNewButton.addActionListener(new EmitirLicenciaAction(framePerteneciente)); 
				
		
		panel_6.add(btnNewButton);
		
		JPanel panel_2 = new JPanel();
		panel_2.setMaximumSize(new Dimension(600, 50));
		panel_2.setPreferredSize(new Dimension(600, 60));
		panel_5.add(panel_2);
		
		
		JButtonEfec btnDarDeAlta=new JButtonEfec("All-mail-48.png","Alta de titular","Ctrl+P");
		btnDarDeAlta.setMinimumSize(new Dimension(150, 50));
		btnDarDeAlta.setMaximumSize(new Dimension(150, 50));
		btnDarDeAlta.setPreferredSize(new Dimension(250, 50));
		btnDarDeAlta.addActionListener(new AltaTitularAction(framePerteneciente));
		panel_2.add(btnDarDeAlta);
		
		JPanel panel_1 = new JPanel();
		panel_1.setMinimumSize(new Dimension(150, 60));
		panel_1.setMaximumSize(new Dimension(600, 60));
		panel_1.setPreferredSize(new Dimension(600, 60));
		panel_5.add(panel_1);
		
		JButtonEfec btnImprimirLicencia=new JButtonEfec("All-mail-48.png","Imprimir licencia","Ctrl+D");
		btnImprimirLicencia.setPreferredSize(new Dimension(250, 50));
		btnImprimirLicencia.setMinimumSize(new Dimension(150, 50));
		btnImprimirLicencia.setMaximumSize(new Dimension(150, 50));
		
		panel_1.add(btnImprimirLicencia);
	

	}
	
	

}
